/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package nominalitzacions.drivers;
import java.util.Scanner;
import nominalitzacions.stubs.Dictionary;
import nominalitzacions.persistance.FormsDataManager;
import java.io.*;
/**
 *
 * @author sonia.sandalinas
 */
public class VerbFormsDataMangerDriver {
    public static void main(String args[] ) {
        System.out.println("Escriu la ruta del fitxer origen:");
        Scanner sc = new Scanner(System.in);
        FormsDataManager FDM = null;
        try {
            FDM = new FormsDataManager(sc.next());
        } catch (IOException ex) {
            System.out.println(ex.getMessage());
        }
        Dictionary dic = null;
        try {
            dic = FDM.readDiccionari();
        } catch (FileNotFoundException ex) {
            System.out.println(ex.getMessage());
        } catch (IOException ex) {
            System.out.println(ex.getMessage());
        }
        try {
            FDM.writeDiccionari(dic);
        } catch (IOException ex) {
            System.out.println(ex.getMessage());
        }
    }
}